PPG-based AF detection algorithm